# Maintainer: Nathan <ndowens@artixlinux.org>
pkgname=birdtray
pkgver=1.9.0
pkgrel=1
pkgdesc="Run Thunderbird with a system tray icon"
url="https://github.com/gyunaev/birdtray"
arch="all"
license="GPL-3.0-only"
makedepends="cmake qt5-qttools-dev qt5-qtbase-dev qt5-qtsvg-dev
	qt5-qtx11extras-dev"
options="!check" # test fails with tests_NOTBUILT executable missing
source="$pkgname-$pkgver.tar.gz::https://github.com/gyunaev/birdtray/archive/v$pkgver.tar.gz
	"

build() {
	cp -r src/translations translations

	if [ "$CBUILD" != "$CHOST" ]; then
		export CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="898bfcebc7ba4b738e3ab41539c4de48871ebccf431bb1b12464e7f2956bad95af6158742c64ec5923d63889e777c98c75db31121d926e26f3dfe1b34d9f8b4a  birdtray-1.9.0.tar.gz"
